package ar.edu.unq.wannaplay.panels;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.PropertyModel;

public class FeedBackPanel extends NonServicedPanel {

    private Label feedBackLabel;

    private String message;

    private static final long serialVersionUID = 1L;

    public FeedBackPanel(final String id) {
        super(id);
        this.initialize();
    }

    private void initialize() {
        this.setMessage("");
        this.setFeedBackLabel(new Label("feedback", new PropertyModel(this, "message")));
        this.getFeedBackLabel().setOutputMarkupId(true);
        this.add(this.getFeedBackLabel());
        this.setOutputMarkupId(true);
    }

    public Label getFeedBackLabel() {
        return feedBackLabel;
    }

    public void changeMessage(final String newMessage) {
        this.setMessage(newMessage);
    }

    public String getMessage() {
        return message;
    }

    public void setFeedBackLabel(final Label feedBackLabel) {
        this.feedBackLabel = feedBackLabel;
    }

    public void setMessage(final String message) {
        this.message = message;
    }

}
